package net.zjitc.abstracts.chattool;

/**
 * @Author admin
 * @Date 2019/3/22 8:35
 */
public class ChatFactory {

    public static ChatTool getChat(int a) {
        ChatTool chat;
        /* 利用多态创建对象*/
        if(a==1){
            chat=new WeiBo();
        }else{
            chat=new WeiXin();
        }
        return chat;
    }
}
